function updateCurrentDate() {
	var currentTime = new Date();
	var intDay = currentTime.getDate(); // 0-31
	var intMonth = currentTime.getMonth(); // 0-11
	var strMonth = "";
	var intYear = currentTime.getFullYear(); // four digit year
	var fieldNameElement = document.getElementById("theday");

	if (fieldNameElement != null) {
		switch (intMonth) {
		case 0:
			strMonth = "January ";
			break;
		case 1:
			strMonth = "February ";
			break;
		case 2:
			strMonth = "March ";
			break;
		case 3:
			strMonth = "April ";
			break;
		case 4:
			strMonth = "May ";
			break;
		case 5:
			strMonth = "June ";
			break;
		case 6:
			strMonth = "July ";
			break;
		case 7:
			strMonth = "August ";
			break;
		case 8:
			strMonth = "September ";
			break;
		case 9:
			strMonth = "October ";
			break;
		case 10:
			strMonth = "November ";
			break;
		case 11:
			strMonth = "December ";
			break;
		}
		fieldNameElement.innerHTML = intDay.toString() + "<span>" + strMonth + intYear.toString() + "</span>";
	}
}


function initialStart() {
	runPrettyPrint(); //highlight code
	updateCurrentDate(); 
	
}


function runPrettyPrint () {
	if(!document.getElementsByClassName){ //IE 8 doesnt support getElementsByClassName
		document.getElementsByClassName = Element.prototype.getElementsByClassName = function(class_names) {
		    // Turn input in a string, prefix space for later space-dot substitution
		    class_names = (' ' + class_names)
	        // Escape special characters
	        .replace(/[~!@$%^&*()_+\-=,./';:"?><[\]{}|`#]/g, '\\$&')
	        // Normalize whitespace, right-trim
	        .replace(/\s*(\s|$)/g, '$1')
	        // Replace spaces with dots for querySelectorAll
	        .replace(/\s/g, '.');
		    return this.querySelectorAll(class_names);
		};
	}

	if(document.getElementsByClassName('prettyprint').length != 0){ //if we have code to highlight
		prettyPrint();
	}
	
}